import {
	http
} from '../httpIndex.js'

export default {
	//获取规则制度内容
	getRuleList() {
		return http.get(`app/ruleRegulation/ruleRegulationList`)
	},
	//根据id获取规则制度详情
	getRuleRegulationById(id) {
		return http.get(`app/ruleRegulation/getRuleRegulationById/${id}`)
	},
	//阅读量+1
	autoIncrementViewCount(id) {
		return http.get(`app/ruleRegulation/autoIncrementViewCount/${id}`)
	},
	
	
	
	//app技能页面-根据用户id查询用户分配的技能任务
	getSkillsBatchByUserId(id) {
		return http.get(`app/studySkills/getSkillsBatchByUserId/${id}`)
	},
	//app技能学习页面-根据技能id查询技能信息
	getStudySkillsById(id){
		return http.get(`app/studySkills/getStudySkillsById/${id}`)
	},
	//app技能学习页面-完成技能学习
	completeLearning(userId,batchId) {
		return http.get(`app/studySkills/completeLearning?userId=${userId}&batchId=${batchId}`);
	},
	//app答题页面-根据技能id获取需要考试的题目
	getExamQuestionsById(id) {
		return http.get(`app/studySkills/getExamQuestionsById/${id}`)
	},
	//app答题页面-根据考试记录id获取本次答题情况
	getExamQuestionsResultByExamId(id) {
		return http.get(`app/studySkills/getExamQuestionsResultByExamId/${id}`)
	},
	//app答题页面-考试交卷
	handPaper(data) {
		return http.post(`app/studySkills/handPaper`,data)
	},
	//app答题结果页面-根据考试id获取本次考试信息
	getExamById(id) {
		return http.get(`app/studySkills/getExamById/${id}`)
	},
	//app我的答题页面-查询用户答题记录
	getUserAnswerRecordList(id) {
		return http.get(`app/studySkills/getUserAnswerRecordList/${id}`)
	}
}